<template>
  <div>
    <van-popup 
    v-model="show" 
    position="bottom" 
    :close-on-click-overlay="false" 
    @click-overlay="closeClick">
      <div class="popup_content">
        <div class="content">
          <ul>
            <li class="list_item" @click="shareLink(0)">
              <span class="iconfont">&#xe6ea;</span>
              <div class="list_text">微信</div>
            </li>
             <li class="list_item" @click="shareLink(1)">
              <span class="iconfont">&#xe60c;</span>
              <div class="list_text">朋友圈</div>
            </li>
             <li class="list_item" @click="shareLink(2)">
              <span class="iconfont">&#xe610;</span>
              <div class="list_text">QQ</div>
            </li>
             <li class="list_item" @click="shareLink(3)">
              <span class="iconfont">&#xe666;</span>
              <div class="list_text">QQ空间</div>
            </li>
             <li class="list_item" @click="shareLink(4)">
              <span class="iconfont">&#xe61a;</span>
              <div class="list_text">复制链接</div>
            </li>
          </ul>
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script>
  export default {
    props: {
      show: {
        type: Boolean,
        default: false
      },
    },
    methods: {
      closeClick() {
        this.$emit('close-click')
      },
      shareLink(val) {
        this.$emit('share-link',val)
        this.$emit('close-click')
      }
    },
  }
</script>

<style scoped>
.popup_content {
  padding: 0 30px 40px;
  /* padding-bottom: env(safe-area-inset-bottom); */
}

.content {
  box-sizing: border-box;
  padding: 60px 30px;
  width: 690px;
  height: auto;
  border-radius: 40px;
  background: #fff;
  margin-left: 50%;
  transform: translateX(-50%);
}

.content ul {
  width: 630px;
  height: 350px;
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
}

.list_item {
  width: 210px;
  font-size: 28px;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: space-between;
}

.list_text {
  padding-top: 20px;
}
</style>